package com.game.Misaka;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

public class main extends JavaPlugin {
    @Override
    public void onEnable() {
        Bukkit.getScheduler().scheduleSyncRepeatingTask(Bukkit.getPluginManager().getPlugin(getName()),new trd(),0,600 * 1000);
        getLogger().info(new String(
                "感谢Ldcr的帮助(sakurakoi) 感谢FC的帮助 Xr_Misaka_Mikoto 第一个用的上的java插件"
        ));
        Bukkit.getConsoleSender().sendMessage(new String[]{
                "§b§lRemiaft §f>> §f----------------------------------------------------------------",
                "§b§lRemiaft §f>> §b作者Misaka_Mikoto",
                "§b§lRemiaft §f>> §b输出版本 1.0",
                "§b§lRemiaft §f>> §f----------------------------------------------------------------",
        });
    }

    static class trd extends BukkitRunnable
    {
        public void run() {
            Bukkit.dispatchCommand(Bukkit.getConsoleSender(),"clearBlock".toLowerCase());
            Bukkit.broadcastMessage("§c御坂美琴即将电没你放置的方块");
        }
    }
        @Override
        public void onDisable() {
            getLogger().info(new String(
                    "感谢Ldcr (Sakura koi) 以及 FC提供的帮助（"
            ));
            Bukkit.getConsoleSender().sendMessage(new String[]{
                    "已结束 作者 Misaka_Mikoto",
            });
        }
}

